<template>
  <div class="home">
    <div v-if="!verified" style="height: 100%; width: 100%; display: flex; align-items: center; justify-content: center;">
      <Password/>
    </div>
    <div v-else style="height: 100%; width: 100%;">
      <NavHead class="head"/>
      <div class="content">
        <ToolBar class="toolbar"/>
        <Editor class="editor"/>
        <Func class="func-container"/>
      </div>
    </div>
  </div>
</template>

<script setup>
import NavHead from './NavHead.vue'
import Editor from './Editor.vue'
import Func from './Func.vue'
import ToolBar from './ToolBar.vue'
import Password from './Password.vue'
import { storeToRefs } from 'pinia'
import { useStore } from '../store/index.js'
const store = useStore()
const { verified } = storeToRefs(store)
</script>

<style lang="scss" scoped>
.home{
  height: 100%;
  width: 100vw;
  .head{
    height: 56px;
    box-sizing: border-box;
    border-bottom: 1px solid #dfdfdf;
  }
  .content{
    height: calc(100vh - 70px);
    display: flex;
    .toolbar{
      width: 50px;
    }
    .editor{
      width: calc(60% - 60px);
      margin-right: 10px;
    }
    .func-container{
      border-left: 1px solid #dfdfdf;
      border-bottom: 1px solid #dfdfdf;
      flex: 1 1 40%;
      overflow: auto;
    }
  }
}
</style>
